<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns underlying input buffer associated with current buffer
  event</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventbufferevent.getenabled.html">EventBufferEvent::getEnabled</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventbufferevent.getoutput.html">EventBufferEvent::getOutput</a></div>
 <div class="up"><a href="class.eventbufferevent.html">EventBufferEvent</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="eventbufferevent.getinput" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventBufferEvent::getInput</h1>
  <p class="verinfo">(PECL event &gt;= 1.2.6-beta)</p><p class="refpurpose"><span class="refname">EventBufferEvent::getInput</span> &mdash; <span class="dc-title">Returns underlying input buffer associated with current buffer
  event</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventbufferevent.getinput-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type"><a href="class.eventbuffer.html" class="type EventBuffer">EventBuffer</a></span> 
   <span class="methodname"><strong>EventBufferEvent::getInput</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   Returns underlying input buffer associated with current buffer event. An
   input buffer is a storage for data to read.
  </p>
  <p class="para">
   Note, there is also
   <em>
    <a href="class.eventbufferevent.html#eventbufferevent.props.input" class="link">input</a>
   </em>
   property of
   <a href="class.eventbufferevent.html" class="classname">EventBufferEvent</a>
   class.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventbufferevent.getinput-parameters">
  <h3 class="title">参数</h3>
  <p class="para">此函数没有参数。</p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventbufferevent.getinput-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns instance of
   <a href="class.eventbuffer.html" class="classname">EventBuffer</a>
   input buffer associated with current buffer event.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-eventbufferevent.getinput-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-4163">
   <p><strong>Example #1 Buffer event&#039;s read callback</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">readcb</span><span style="color: #007700">(</span><span style="color: #0000BB">$bev</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$base</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$input&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$bev</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">;&nbsp;</span><span style="color: #FF8000">//$bev-&gt;getInput();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">while&nbsp;((</span><span style="color: #0000BB">$n&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #0000BB">$buf</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1024</span><span style="color: #007700">))&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$buf</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventbufferevent.getinput-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">
    <span class="methodname"><a href="eventbufferevent.getoutput.html" class="methodname" rel="rdfs-seeAlso">EventBufferEvent::getOutput()</a> - Returns underlying output buffer associated with current buffer
  event</span>
   </li>
  </ul>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventbufferevent.getenabled.html">EventBufferEvent::getEnabled</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventbufferevent.getoutput.html">EventBufferEvent::getOutput</a></div>
 <div class="up"><a href="class.eventbufferevent.html">EventBufferEvent</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
